<template>
    <div id="app" :class="[themeClass]">
        <router-view />
    </div>
</template>

<script>
//设置html的font-size，使用rem做单位时
var docEl = document.documentElement,
    resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
    recalc = function () {
        var clientWidth = docEl.clientWidth;
        if (!clientWidth) return;
        if (clientWidth >= 1536) {
            docEl.style.fontSize = '100px';
        } else {
            docEl.style.fontSize = 100 * (clientWidth / 1536) + 'px';
        }
    };
import {mapGetters} from "vuex"
export default {
    name: 'App',
    components: {},
    computed:{
        ...mapGetters(["themeClass"])
    },
	mounted(){
        recalc();
        if (!document.addEventListener) return;
        window.addEventListener(resizeEvt, recalc, false);
	}
}
</script>

<style lang="scss">
@import "@/style/theme/theme.scss";
#app{
    height:100%;
}
.app-content{
    position:relative;
    z-index: 2;
    box-sizing: border-box;
    padding:0 0.5rem;
    .app-view+.app-view{
        margin-top:0.5rem;
    }
}
.app-view{
    background-color:#fff;
    border-radius: 10px;
    .van-cell{
        background:none;
        font-size:0.34rem;
    }
    .van-cell-group{
        background:none;
        &:after{
            display:none;
        }
    }
    .van-tabs{
        .van-tabs__nav{
            background:none;
        }
    }
}
.customer-registration{
    .van-cell{
        line-height: 0.8rem;
        padding:0.35rem 0.25rem;
        font-size:0.34rem;
        .van-field__left-icon{
            margin:0 0.35rem;
        }
        .van-field__right-icon{
            padding:0;
            margin-right:0;
            .iconfont{
                width:0.8rem;
                display:flex;
                align-items: center;
                justify-content: center;
                font-weight: bold;
            }
        }
        .iconfont{
            font-size:0.34rem;
            display:block;
        }
    }
}
.van-popover--dark {
    .van-popover__content{
        background-color:rgba(0,0,0,0.85);
        border-bottom-color:rgba(0,0,0,0.85);
    }
}
</style>
